<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('avatar')->default('')->comment('头像');
            $table->string('name')->default('')->comment('姓名');
            $table->tinyInteger('gender')->default('1')->comment('性别');
            $table->string('birthday')->default('')->comment('生日');
            $table->string('bio')->default('')->comment('签名');
            $table->string('invite_code')->default('')->comment('邀请码');
            $table->decimal('money')->default('0.00')->comment('余额');
            $table->decimal('earning')->default('0.00')->comment('收益');
            $table->string('province')->default('')->comment('省');
            $table->string('city')->default('')->comment('市');
            $table->string('area')->default('')->comment('区');
            $table->string('email')->default('')->comment('邮箱');
            $table->timestamp('email_verified_at')->nullable()->comment('邮箱验证时间');
            $table->string('password')->default('')->comment('密码');
            $table->string('remember_token')->nullable()->comment('令牌');
            $table->tinyInteger('xinli')->default('0')->comment('心理咨询师');
            $table->tinyInteger('zhanbu')->default('0')->comment('占卜师');
            $table->tinyInteger('qingting')->default('0')->comment('倾听师');
            $table->integer('like_num')->default('0')->nullable()->comment('点赞数');
            $table->tinyInteger('status')->default('1')->comment('状态');
            $table->string('mobile')->nullable()->comment('手机号');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
